home *** CD-ROM | disk | FTP | other *** search
/ Internet Surfer 2.0 / Internet Surfer 2.0 (Wayzata Technology) (1996).iso / pc / textfile / faqs / epoch_fa < prev    next >
Encoding:
Internet Message Format  |  1992-12-26  |  51.4 KB

  1. Xref: bloom-picayune.mit.edu gnu.epoch.misc:1882 news.answers:4619
  2. Path: bloom-picayune.mit.edu!enterpoop.mit.edu!news.media.mit.edu!micro-heart-of-gold.mit.edu!xn.ll.mit.edu!ames!olivea!uunet!brunix!brunix!dbc
  3. From: dbc@cs.brown.edu (Brook Conner)
  4. Newsgroups: gnu.epoch.misc,news.answers
  5. Subject: Epoch Frequently Asked Questions (FAQ)
  6. Summary: Epoch FAQ for Oct '92
  7. Keywords: Epoch FAQ
  8. Message-ID: <1992Dec15.195917.28483@cs.brown.edu>
  9. Date: 15 Dec 92 19:59:17 GMT
  10. Sender: news@cs.brown.edu
  11. Reply-To: dbc.epoch-faq@cs.brown.edu
  12. Followup-To: poster
  13. Organization: Brown University Department of Computer Science
  14. Lines: 1348
  15. Approved: news-answers-request@mit.edu
  16.  
  17. Archive-name: epoch-faq
  18. Last-modified: Fri Oct 16 14:44:54 EDT 1992
  19. Version: 2.0
  20. Posting-frequency: bimonthly
  21.  
  22. *   Epoch FAQ (Frequently Asked Questions)
  23. *   (or at least Occasionally Wondered-About Questions)
  24.  
  25. *   Maintained by Brook Conner (dbc.epoch-faq@cs.brown.edu)
  26. *   Last Modified Fri Oct 16 14:45:31 EDT 1992
  27. *   by Brook Conner (dbc.epoch-faq@cs.brown.edu)
  28.  
  29. If you are viewing this text in a GNU Emacs buffer, you can type
  30. "M-2 C-x $" to get an overview of just the questions.  Then, when
  31. you want to look at the text of the answers, just type "C-x $".
  32.  
  33. To search for a question numbered XXX, type "M-C-s ^XXX:", followed by
  34. a C-r if that doesn't work; type ESC to end the search.
  35.  
  36. !! The latest version of this file will be always available via anonymous
  37. !! FTP to ftp.ncsa.uiuc.edu in /outgoing/marca/epoch or cs.uiuc.edu in
  38. !! /pub/epoch-files/epoch 
  39.  
  40. Please feel free to send comments, suggestions, additions, and
  41. corrections to dbc.epoch-faq@cs.brown.edu
  42.  
  43. *                   === REALLY IMPORTANT NOTE ===
  44.  
  45. Unless otherwise attributed, information below is based only on Yours
  46. Truly's use and experience with Epoch and is BY NO MEANS GUARANTEED to
  47. be correct, complete, or even coherent.  If it works for you, great;
  48. if it doesn't, let me know, but there are no guarantees.
  49.  
  50. *             === CHANGES IN THIS VERSION OF THE FAQ ===
  51.   
  52.   Here is a list of changes made since the FAQ's last bimonthly
  53.   posting to gnu.epoch.misc and news.answers:
  54.   
  55.  a) No changes.
  56.  
  57. *                       === PREREQUISITES ===
  58.   
  59.   In the answers that follow, I assume at least a little familiarity
  60.   with GNU Emacs Lisp.  Suggested resources that could be considered
  61.   necessary references for material in this FAQ are: 
  62.  
  63. --> The GNU Emacs and Epoch manuals (available online via C-h i).  
  64.   
  65. --> The GNU Elisp manual (available via anonymous FTP from
  66.     prep.ai.mit.edu (18.71.0.38) as /pub/gnu/elisp-manual-1.03.tar.Z).
  67.   
  68. --> The gnu.emacs.help FAQ in the file etc/FAQ (the latest version
  69.     is available in the gnu.emacs.help Usenet newsgroup or via FTP from
  70.     pit-manager.mit.edu (18.172.1.27) in /pub/usenet/gnu.emacs.help).
  71.  
  72. *                          === CAVEATS ===
  73.   
  74.   Many of the answers given herein APPLY ONLY to Epoch 4.2.  I run
  75.   Epoch on SPARCstations, DECstation 5000s, IBM RS/6000s, and HP 700s;
  76.   other configurations may behave differently.  Please let me know of
  77.   any such differences.
  78.  
  79. *                    === EPOCH AND GNU EMACS ===
  80.  
  81. A-1: What is Epoch?
  82.   
  83.   Epoch is GNU Emacs on steroids: an adaptation of GNU Emacs with lots
  84.   of additional support for features made possible by the X11
  85.   windowing system.  These features include multiple editing windows,
  86.   arbitrary colors and fonts (fixed-width and proportional),
  87.   selectable zones per buffer with arbitrary display styles (font,
  88.   color, underline, stipple, pixmap), an optional separate minibuffer
  89.   window, improved keyboard and mouse handling, full 8-bit character
  90.   set support, and more.
  91.   
  92.   Epoch, like GNU Emacs, is very customizable; much of this FAQ
  93.   describes ways to customize Epoch for specific purposes.
  94.   
  95. A-2: How can I get Epoch?
  96.   
  97.   Epoch is available via anonymous FTP to cs.uiuc.edu (128.174.252.1)
  98.   in pub/epoch-files/epoch.  The main file of interest is currently
  99.   epoch-4.2.tar.Z.
  100.   
  101.   According to Simon Marshall (S.Marshall@sequent.cc.hull.ac.uk):
  102.   
  103.   Like GNU & X11 stuff, epoch is available in the UK from
  104.   uk.ac.ic.doc.src (00000510200001).  You can log on; there's help to
  105.   tell you the different ways of getting source.  Epoch is in
  106.   /gnu/epoch.
  107.   
  108.   Epoch is also available from aix370.rrz.uni-koeln.de (134.95.132.2)
  109.   in /gnu/emacs/epoch.
  110.   
  111.   Volunteers for other FTP sites outside the United States, or for
  112.   mail access to Epoch source, please step forward.
  113.   
  114. A-3: What is the latest version of Epoch?
  115.   
  116.   The latest version is 4.2.  Previous versions still in use by some
  117.   people include 4.0 patchlevels 0,1, and 2, 4.1, the 4.0 alpha and
  118.   beta levels, and version 3.2.
  119.   
  120.   Epoch 4.2 is based on GNU Emacs 18.58, which is the most recent
  121.   version of GNU Emacs.
  122.   
  123.   Existing installations of Epoch 4.1 should be upgraded to 4.2 as
  124.   soon as possible.
  125.   
  126. A-4: I recently moved to Epoch 4.0b0 (or later), and elisp code that
  127. worked before has stopped working.  Why?
  128.   
  129.   In one of the beta versions of epoch, the term "button" was replaced
  130.   by the term "zone".  The idea was, "button" was misleading (since it
  131.   refered to a mouse button or a pushbutton as well).  It didn't
  132.   really describe Epoch's attributed text.
  133.   
  134.   As a consequence, the names of all the button-related function names
  135.   and variables were changed.  There are two ways to deal with this
  136.   change:
  137.   
  138.   METHOD #1:
  139.   
  140.     Put the following command at the head of each file of elisp code
  141.     that uses buttons:
  142.     
  143.     (require 'button)
  144.     
  145.     (This simply does a series of fset's to replace the "button" names
  146.     with the new "zone" names.)
  147.     
  148.   METHOD #2:
  149.     
  150.     Convert all references of "button" to "zone".  You can use the
  151.     function convert-current-buffer in epoch-lisp/convert-buttons.el
  152.     (in the Epoch distribution) to do this automatically.
  153.     
  154.     NOTE: There may be additional problems; in particular, since
  155.     attributes were eliminated in Epoch 4.0, any use of them will have
  156.     to be eliminated also.  This is less simple than switching from
  157.     buttons to zones.  Fortunately, most Epoch packages on the net now
  158.     support 4.0.  Therefore, I won't bother to come up with an answer
  159.     for this one (unless someone actually needs to know).
  160.     
  161. A-5: I recently moved to a newer version of Epoch, and my X resources
  162.   are suddenly being ignored.  Why?
  163.   
  164.   Old versions of Epoch extracted its X default resources from
  165.   the user's .Xdefaults file by hand; this is no longer the case.  If
  166.   Epoch isn't picking up resources like previous versions did on your
  167.   system, prior to starting Epoch do this:
  168.   
  169.     xrdb -merge $HOME/.Xdefaults
  170.   
  171.   This makes the X server's database pick up and maintain all of the
  172.   resource definitions found in $HOME/.Xdefaults.
  173.   
  174.   Alternatively, you can use the '-ud' command line flag to force
  175.   Epoch to manually scan $HOME/.Xdefaults.
  176.   
  177.   A second problem is that Epoch uses the first word in the command
  178.   that executed Epoch (argument 0) to search the X resource database
  179.   for Epoch resources.  Thus, if you invoke Epoch with the name:
  180.   
  181.     epoch-4.2
  182.   
  183.   ...Epoch will use the string 'epoch-4.2' to search the resource
  184.   database, thereby missing the resources specified by the name
  185.   'epoch'.  The workaround is to use the '-name' or '-rn' command-line
  186.   option like so:
  187.   
  188.     epoch-4.2 -name epoch
  189.    
  190.   or:
  191.   
  192.     epoch-4.2 -rn epoch
  193.   
  194.   Using -name is more recommended, as it is a sort-of standard option
  195.   among X applications (most X Toolkit applications support it).
  196.   
  197.   [From Martin Boyer (mboyer@ireq-robot.hydro.qc.ca).]
  198.   
  199. A-6: What's the difference between Epoch and GNU Emacs version 19?
  200.   
  201.   To quote directly from the GNU 'status' file (obtained via anonymous
  202.   FTP to prep.ai.mit.edu (18.71.0.38) as /pub/gnu/status):
  203.   
  204.   -- BEGIN QUOTE -----------------------------------------------------
  205.   Emacs 18 maintenance continues for simple bug fixes.  Version 19
  206.   approaches release, counting among its new features before and after
  207.   change hooks, source-level debugging of Emacs Lisp programs, X
  208.   selection processing, including CLIPBOARD selections, scrollbars,
  209.   support for European character sets, floating point numbers,
  210.   per-buffer mouse commands, interfacing with the X resource manager,
  211.   mouse-tracking, lisp-level binding of function keys, and multiple X
  212.   windows (`screens' to emacs).
  213.   
  214.   Thanks go to Alan Carroll and the people who worked on Epoch for
  215.   generating initial feedback to a multi-windowed emacs.  Emacs 19
  216.   supports two styles of multiple windows, one with a separate screen
  217.   for the minibuffer, and another with a minibuffer attached to each
  218.   screen.
  219.   
  220.   A couple of other features of Version 19 are buffer allocation, which
  221.   uses a new mechanism capable of returning storage to the system when a
  222.   buffer is killed, and a new input system--all input now arrives in the
  223.   form of Lisp objects.
  224.   
  225.   Other features under consideration for later releases of Version 19
  226.   include:
  227.   
  228.   ** Associating property lists with regions of text in a buffer.
  229.   ** Multiple font, color, and pixmaps defined by those properties.
  230.   ** Different visibility conditions for the regions, and for various
  231.      windows showing one buffer.
  232.   ** Hooks to be run if point or mouse moves outside a certain range.
  233.   ** Incrementally saving undo history in a file, so that recover-file
  234.      also reinstalls buffer's undo history.
  235.   ** Static menu bars, and better pop-up menus.
  236.   -- END QUOTE -------------------------------------------------------
  237.   
  238.   Epoch currently supports much of the new functionality of GNU Emacs
  239.   v19, including some features that apparently won't be immediately
  240.   available in GNU Emacs v19 (notably, associating property lists with
  241.   regions of text, and multiple fonts/colors/pixmaps defined by those
  242.   properties).
  243.   
  244.   A postscript to this answer is a message that Richard Stallman
  245.   (Mr. Gnu himself) posted to gnu.emacs.help in Apr 1992:
  246.   
  247.   -- BEGIN QUOTE -----------------------------------------------------
  248.   Emacs 19 won't support text highlighting, but a later version will.
  249.   
  250.   We have code basically working for attaching arbitrary properties to
  251.   parts of the text, including choice of font and color.
  252.   
  253.   This feature is designed for attributes which are considered part of
  254.   the text itself.  What Epoch provides is highlighting that is part
  255.   of the presentation of the text, not logically part of the text itself.
  256.   That is useful also; I hope we will find the wherewithal to implement
  257.   that along with the other highlighting features.
  258.   -- END QUOTE -------------------------------------------------------
  259.   
  260.   There is also a version of Emacs 19 written by Lucid.  Called "Lucid
  261.   Emacs", this is something from its README about it:
  262.   
  263.   -- BEGIN QUOTE -----------------------------------------------------
  264.   Lucid GNU Emacs 19.3 is now available.  This is a version of GNU
  265.   Emacs derived from an early version of Emacs version 19 from the
  266.   Free Software Foundation. 
  267.   
  268.   You can get it via anonymous FTP from the host labrea.Stanford.EDU
  269.   (36.8.0.47). It is currently available only by FTP.  We don't have
  270.   the manpower to make tapes right now.
  271.   
  272.   Log in with the user "anonymous" and "username@host" as a password
  273.   (that is, your email address.)  Execute the command "cd
  274.   pub/gnu/lucid/".  These are the files you will find there:
  275.  
  276.   lemacs-19.3.tar.Z
  277.         The complete source distribution.  This file is about 8 megabytes.
  278.         When untarred and uncompressed, the source distribution will take up
  279.         about 20 megs. You will need an additional 12 megs or so to compile it.
  280.   
  281.   lemacs-19.3-sun4.tar.Z
  282.         This is a ready-to-run set of Sun4 executables, and a DOC file.  If
  283.         you want to use these executables, you will still need to get the file
  284.         lemacs-19.3.tar.Z, because Emacs cannot function very well without the
  285.         lisp library online.  This file is about 1.7 megs, 3.8 megs when
  286.         unpacked, 3 megs of which is the Emacs executable itself (2.1 megs if
  287.         stripped.)
  288.   
  289.   Don't forget to set "binary" mode when transferring these files.
  290.   Unpack them with some variation of the command "zcat
  291.   lemacs-19.3.tar.Z | tar -vxf -". 
  292.   
  293.   .... [edit out info on lucid emacs mailing lists] ....
  294.   
  295.   Why Another Version of Emacs?
  296.   =============================
  297.   
  298.   Lucid's latest product, Energize, is a C/C++ development
  299.   environment.  Rather than invent (and force our users to learn) a
  300.   new user-interface, we chose to build part of our environment on top
  301.   of the world's best editor, GNU Emacs. (Though our product is
  302.   commercial, the work we did on GNU Emacs is free software, and is
  303.   useful without having to purchase our product.) 
  304.   
  305.   We needed a version of Emacs with mouse-sensitive regions, multiple
  306.   fonts, the ability to mark sections of a buffer as read-only, the
  307.   ability to detect which parts of a buffer has been modified, and
  308.   many other features. 
  309.   
  310.   Why Not Epoch?
  311.   ==============
  312.   
  313.   For our purposes, the existing version of Epoch was not sufficient;
  314.   it did not allow us to put arbitrary pixmaps/icons in buffers,
  315.   `undo' did not restore changes to regions, regions did not overlap
  316.   and merge their attributes in the way we needed, and several other
  317.   things. 
  318.   
  319.   We could have devoted our time to making Epoch do what we needed
  320.   (and, in fact, we spent some time doing that) but, since the FSF
  321.   planned to include Epoch-like features in their version 19, we
  322.   decided that our efforts would be better spent improving Emacs19
  323.   instead of Epoch.  
  324.   
  325.   Our original hope was that our changes to Emacs would be
  326.   incorporated into the "official" v19.  However, scheduling conflicts
  327.   arose, and we found that, given the amount of work still remaining
  328.   to be done, we didn't have time to merge with the FSF's code.
  329.   Consequently, we have released our work as a forked branch of Emacs,
  330.   instead of delaying any longer. 
  331.   
  332.   It seems likely that a merger of Epoch and Lucid Emacs will occur in
  333.   the not-too-distant future.
  334.   -- END QUOTE -------------------------------------------------------
  335.   
  336.   
  337. *                     === CONFIGURING EPOCH ===
  338.  
  339. B-1: How can my .emacs file deal with both GNU Emacs and Epoch?
  340.   
  341.   An easy way to handle both GNU Emacs and Epoch within the same .emacs
  342.   file is to define a variable 'running-epoch' as follows:
  343.   
  344.   (defvar running-epoch (boundp 'epoch::version))
  345.   
  346.   Then, the rest of your .emacs file can look like this:
  347.   
  348.     (if running-epoch
  349.       (progn
  350.         ... [Epoch-specific code here] ...
  351.     ))
  352.   
  353.   ... [Emacs code here] ...
  354.   
  355.   (After this, when I refer to 'your .emacs file', read that as 'the
  356.   Epoch-specific portion of your .emacs file', under the assumption that
  357.   you have both general and Epoch-specific parts as detailed above.)
  358.   
  359.   If you have a large amount of Epoch-specific code it may be better to
  360.   put it in a separate file (e.g., "epoch-specific.el"), possibly
  361.   byte-compile it, then load it from your .emacs file like so:
  362.   
  363.     (if (boundp 'epoch::version) (load "epoch-specific"))
  364.   
  365. B-2: What if I want to have separate sections for Epoch 3.2 and 4.0 in
  366.  my .emacs file?
  367.   
  368.   The variable 'epoch::version' is a string that contains the current
  369.   Epoch version ID.  For instance, evaluating epoch::version under
  370.   Epoch 4.2 gives:
  371.   
  372.   "Epoch 4.2"
  373.   
  374.   A simple way to determine if version 4.x is running is to do something
  375.   like this:
  376.   
  377.     (string-match " 4" epoch::version)
  378.   
  379.   This will result in 't' if the string " 4" is a substring of
  380.   epoch::version (as would be the case when epoch::version is
  381.   "Epoch 4. ..."), and 'nil' otherwise.
  382.   
  383. B-3: How can I configure Epoch to support full 8-bit character sets?
  384.   
  385.   There are two parts to this: display and input.
  386.   
  387.   Display is handled by the variables "meta-printable" and
  388.   "ctl-arrow".  From the documentation string for "meta-printable":
  389.   
  390.   Non-nil means meta characters, that is characters in the range
  391.   0240..0377, are printable.  Nil means display meta chars  with
  392.   backslash and octal digits.  Automatically becomes local when set in
  393.   any fashion.  
  394.   
  395.   From the documentation string for "ctl-arrow":
  396.   
  397.   t means display control chars with uparrow. Nil means use backslash
  398.   and octal digits. Automatically becomes local when set in any
  399.   fashion.
  400.   
  401.   Input is handled by the flag "EIGHTBIT_KEYBOARD", which is set in config.h:
  402.   
  403.   /* Define EIGHTBIT_KEYBOARD if you want keys in range 0240 to 0377
  404.    * to insert corresponding eight-bit characters.
  405.    */
  406.   /* #define EIGHTBIT_KEYBOARD */
  407.   
  408.   Define this flag only if you are using a keyboard with direct
  409.   support for 8-bit characters. 
  410.   
  411. *                          === WINDOWS ===
  412.  
  413. C-1: How do I get the minibuffer back at the bottom of my edit window?
  414.   
  415.   Start Epoch with the command-line option '-nm'.  Alternately, in your
  416.   general .Xdefaults file, specify:
  417.   
  418.     epoch.nonlocal.minibuf: False
  419.   
  420. C-2: How do I prevent the initial edit window from appearing?  (In
  421.  other words, how do I get only the minibuffer upon startup?)
  422.   
  423.   There is a variable that controls whether or not an initial edit
  424.   window will be provided. By default, of course, one is; to stop this
  425.   from happening, put the following in your .emacs:
  426.   
  427.     (setq inhibit-initial-screen-mapping t)
  428.   
  429.   This will have no effect if you're using local minibuffers (i.e. when
  430.   the minibuffer is a part of each edit window), as described above.
  431.   
  432.   [Thanks to Chris Love (love@cs.uiuc.edu).]
  433.   
  434. C-3: How do I stop the windows from automatically raising upon entry?
  435.   
  436.   Specify the following in your .emacs file:
  437.   
  438.     (setq auto-raise-screen 'minibuf)
  439.   
  440.   This makes the minibuffer raise when an Epoch edit window is
  441.   entered; if you don't want the minibuffer to raise itself either, do
  442.   the following instead:
  443.   
  444.     (setq auto-raise-screen nil)
  445.   
  446. C-4: How do I change the cursor?
  447.   
  448.   Another noticeable change from GNU Emacs is the cursor glyph (which is
  449.   a pencil shape).  To change this to a more normal-appearing arrow
  450.   shape, put this in your .emacs file:
  451.   
  452.     (cursor-glyph 68)
  453.     (cursor-glyph 68 (epoch::minibuf-screen))
  454.     (push '(cursor-glyph . 68) epoch::screen-properties)
  455.   
  456.   NOTE: You can specify a different cursor glyph for the minibuffer,
  457.   if you like.
  458.   
  459.   There are also X resources for the screen and minibuffer cursor
  460.   glyphs; equivalent to the above elisp code would be the following (in
  461.   your .Xdefaults file):
  462.   
  463.     epoch.screen.cursor.glyph: 68
  464.     epoch.minibuf.cursor.glyph: 68
  465.   
  466.   For either of these approaches, any valid cursor ID number will do; to
  467.   see the available cursors and their ID numbers, take a look at the
  468.   file /usr/include/X11/cursorfont.h.
  469.   
  470.   (See below for details on how to customize the cursor glyph based on
  471.   the mode of a screen's initial buffer.)
  472.   
  473. C-5: How do I define edit screen attributes on a per-mode basis?  Or,
  474.  how do I make my C++ edit windows come up with 48 lines and a big
  475.  round dot for a cursor?
  476.   
  477.   You can define styles for new edit screens created with
  478.   find-file-other-screen (which is, by default, bound to 'C-z 4 C-f' and
  479.   'C-z 4 f') based on the initial buffer's mode like so:
  480.   
  481.     (setq epoch-mode-alist
  482.       (append (list
  483.           (cons 'c-mode
  484.             (list
  485.               (cons 'geometry "80x52")
  486.               (cons 'cursor-glyph 94)))
  487.           (cons 'LaTeX-mode
  488.             (list
  489.               (cons 'geometry "90x48")
  490.               (cons 'cursor-glyph 58)))
  491.           (cons 'c++-mode
  492.             (list
  493.               (cons 'geometry "80x48")
  494.               (cons 'cursor-glyph 38))))
  495.         epoch-mode-alist))
  496.   
  497. C-6: How do I make Epoch manage edit window and icon names based on the
  498.  name of the current buffer(s)?
  499.   
  500.   The base Epoch distribution doesn't support this, but there have
  501.   been a number of small packages written that accomplish this.  There
  502.   is one written by Derek Ney (derek@boingo.med.jhu.edu) up for
  503.   anonymous FTP at ftp.ncsa.uiuc.edu (141.142.20.50) as
  504.   /outgoing/marca/epoch/derek-title.el.Z.  Another one can be found in
  505.   the epoch sources at ftp.uu.net (in the directory
  506.   /languages/emacs-lisp/epoch).
  507.   
  508. C-7: How do I iconify my entire Epoch session at once?
  509.   
  510.   By default, 'C-z i' is bound to iconify-screen, which only iconifies
  511.   the current edit window.  To iconify everything, define a small
  512.   function iconify-everything in your .emacs file like so:
  513.   
  514.     (defun iconify-everything () 
  515.       "Iconify entire Epoch session at once."
  516.       (interactive)
  517.       (dolist (s (screen-list))
  518.         (iconify-screen s))
  519.       (iconify-screen 0)
  520.     )
  521.   
  522.   Then bind it to a key sequence (e.g. 'C-z C-i') like so:
  523.   
  524.     (global-set-key "\C-z\C-i" 'iconify-everything)
  525.   
  526. C-8: Does Epoch support scrollbars?
  527.   
  528.   No; native support for scrollbars is a technical challenge that so far
  529.   no one has taken up for either GNU Emacs or Epoch.
  530.   
  531.   Alternatively, pick up the widgets package from cs.uiuc.edu, in
  532.   pub/epoch-files/widgets/widgets.tar.Z.  This is a Motif-only "widget
  533.   server" that epoch can talk to.  It will produce a nice Motif
  534.   scroll-bar on the side of your epoch screen.  It does a lot more,
  535.   but as far as I can tell, that's all it does out of the box (i.e.,
  536.   without writing some lisp code).  Somebody correct me if I'm wrong,
  537.   here.
  538.   
  539.   [Thanks to Pierre Bondono (bondono@vnet.ibm.com) for the following:]
  540.   
  541.   Related to this, there is a ``scrolling concept'' inside the IMOUSE
  542.   packages that may be of interest.  IMOUSE can be found via anonymous
  543.   FTP from ireq-robot.hydro.qc.ca (131.195.2.130); see question H-1
  544.   below.
  545.   
  546. C-9: My workstation's screen area is overwhelmed by all the windows I
  547.  create in my Epoch editing sessions.  How can I squeeze more windows
  548.  into my working environment?
  549.   
  550.   This is only a half-facetious question; there's only room on most
  551.   workstation screens (usually 1024x768 or 1280x1024 pixels in area) for
  552.   a couple of windows with decent-sized fonts.  To help alleviate the
  553.   discomfort of cramped space, try the 'tvtwm' window manager.  (I sound
  554.   like a cough-drop commercial.)
  555.   
  556.   Tvtwm, a superset of the twm window manager, allows windows to be
  557.   placed on a virtual root window that can be of any size (for example,
  558.   3000 by 3000 pixels).  This virtual root can be navigated via tvtwm's
  559.   'panner', a reduced-size overview of your entire environment.
  560.   
  561.   Tvtwm can be found on your local comp.sources.x archive or in the
  562.   X11R4 and X11R5 distributions.  Try anonymous FTP to ftp.uu.net
  563.   (137.39.1.9) in /usenet/comp.sources.x.
  564.   
  565.   For those people that actually like the OpenLook window manager :-),
  566.   a similarly modified version of Olwm can be found in ftp.uu.net
  567.   /usenet/comp.sources.x/volume14/olvwm (and a lot of other places,
  568.   too).
  569.   
  570.   People running on HP workstations can use the rooms metaphor built
  571.   into the vuewm.  A similar, but less powerful alternative is the vr
  572.   program in the contrib directory at export.lcs.mit.edu.  It,
  573.   however, doesn't support spreading epoch windows around different
  574.   rooms.
  575.   
  576. *                      === COLORS AND FONTS ===
  577.  
  578. D-1: How do I interactively select my foreground color?
  579.   
  580.   First, define a style for each of your desired foreground colors in
  581.   your .emacs file, like so:
  582.   
  583.     (setq red-style (make-style))
  584.     (set-style-foreground red-style "red")
  585.   
  586.   Then, define a short command 'goto-style' like so:
  587.   
  588.     (defun goto-style (newstyle)
  589.       "Set current buffer to a given font NEWSTYLE."
  590.       (setq buffer-style newstyle)
  591.       (redraw-display))
  592.   
  593.   Next, bind commands to keys like so:
  594.   
  595.     (global-set-key "\C-c1" (definteractive (goto-style red-style)))
  596.   
  597.   This binds a command that changes the current foreground color to red
  598.   to the key sequence C-c 1.
  599.   
  600.   The following function allows you to interactive specify a new color
  601.   for the current buffer's foreground:
  602.   
  603.     (defun set-foreground (newfg)
  604.       "Set current foreground color to NEWFG."
  605.       (interactive "sForeground color: ")
  606.       (set-style-foreground buffer-style newfg)
  607.       (redraw-display))
  608.   
  609.   This function is activated by typing:
  610.   
  611.     M-x set-foreground
  612.   
  613.   Or, it can be bound to a key like so:
  614.   
  615.     (global-set-key "\C-z\C-s" 'set-foreground)
  616.   
  617. D-2: How do I switch fonts interactively?
  618.   
  619.   To change fonts, you don't have to define new styles.  Just define a
  620.   short command 'goto-font', like so:
  621.   
  622.     (defun goto-font (newfont)
  623.       "Set current buffer to a given font NEWFONT."
  624.       (font newfont)
  625.       (redraw-display))
  626.   
  627.   Then, bind commands to keys like so:
  628.   
  629.     (global-set-key "\C-c1" (definteractive (goto-font "8x13")))
  630.   
  631.   This changes the current edit window's font to "8x13" when the key
  632.   sequence 'C-c 1' is entered.
  633.   
  634.   The following function allows you to interactively input a font name:
  635.   
  636.     (defun set-font (newfont)
  637.       "Set current font to NEWFONT."
  638.       (interactive "sFont name: ")
  639.       (font newfont)
  640.       (redraw-display))
  641.   
  642.   This function is activated by typing:
  643.   
  644.     M-x set-font
  645.   
  646.   Or, it can be bound to a key like so:
  647.   
  648.     (global-set-key "\C-z\C-s" 'set-font)
  649.   
  650.   If the font you specify with either of these methods isn't valid for
  651.   your X server (i.e. if the font doesn't exist in a directory listed in
  652.   your X server's font path and in that directory's fonts.dir file, or
  653.   isn't available from the font server if you're running X11R5), you
  654.   will get this message in your minibuffer:
  655.    
  656.   Bad font name
  657.   
  658.   Font names are ordinary X font names; for example, a 14-point non-bold
  659.   non-italic Helvetica font can be referred to as:
  660.   
  661.   "*helvetica-medium-r-normal--14*"
  662.   
  663.   The standard X client 'xlsfonts' will give you a list of the fonts
  664.   registered with your X server.  The standard X client 'xfontsel' lets
  665.   you interactively put together an X font specification string based on
  666.   individual attributes (e.g., family, size).
  667.   
  668. D-3: How can I associate a certain foreground color with a file
  669.  so that every time I load that file my foreground color is
  670.  automatically set?
  671.   
  672.   You can easily do this by using GNU Emacs' ability to handle file
  673.   variables.  For example, if you have defined style 'red-style' to
  674.   specify a red foreground color, and want file 'foobar.c' to always
  675.   have the foreground color red, add this to the bottom of 'foobar.c':
  676.   
  677.     ^L
  678.     /*
  679.     Local Variables:
  680.     buffer-style: red-style
  681.     End:
  682.     */
  683.   
  684.   NOTE: '^L' is a newline character; you can enter one in an edit
  685.   buffer by typing 'C-q C-l'.
  686.   
  687.   Then, whenever 'foobar.c' is loaded, the variable 'buffer-style' will
  688.   be set to 'red-style', and as a result the foreground color for that
  689.   buffer will be red.
  690.   
  691. D-4: How do I design my own really funky technicolor modeline?
  692.   
  693.   Using the tried-and-true Learning By Example(tm) educational method,
  694.   I'll just give the (heavily commented) elisp code I use to define my
  695.   own customized modeline:
  696.   
  697.   ;; A style to emphasize things I find important
  698.   (defvar mode:*hilight-style*  (make-style)
  699.     "Style for modeline hilights"
  700.   )
  701.   (let ((s1 mode:*hilight-style*))
  702.    ;; Do something reasonable if we're on a monochrome screen
  703.     (if (> (epoch::number-of-colors) 2)
  704.         (progn
  705.       (set-style-foreground s1 "#83558c")
  706.       (set-style-background s1 (foreground)))
  707.       (progn
  708.       (set-style-foreground s1 (background))
  709.       (set-style-background s1 (foreground))))
  710.     (set-style-font s1 "*helvetica-bold-r-*-*-12-*")
  711.   )
  712.   
  713.   ;; A style for normal modeline contents -- inverted from normal
  714.   ;;  buffer  
  715.   (defvar mode:*normal-style* (make-style)
  716.     "Normal modeline style"
  717.   )
  718.   (let ((s2 mode:*normal-style*))
  719.     (set-style-foreground s2 (background))
  720.     (set-style-background s2 (foreground))
  721.     (set-style-font s2 "*helvetica-medium-r-*-*-12*")
  722.   )
  723.   
  724.   ;; define  a simpler-looking modeline format
  725.   (setq default-mode-line-format
  726.     (list
  727.       ""
  728.       'mode:*normal-style*     
  729.       'mode-line-modified
  730.       ;; Highlight the buffer name
  731.       'mode:*hilight-style*
  732.       " %17b"
  733.       'mode:*normal-style*
  734.       "   "
  735.       'global-mode-string
  736.       "   %[("
  737.       'mode-name 'minor-mode-alist "%n" 'mode-line-process
  738.       ")%]--"
  739.       ;; Highlight where we are in the buffer
  740.       'mode:*hilight-style*
  741.       (cons -3 "%p")
  742.       'mode:*normal-style*
  743.       "-%-"
  744.       )
  745.     )
  746.   
  747.   
  748. D-5: How do I replace the mouse region selection underlining with a
  749.  different style?
  750.   
  751.   The appearance of the region underlined with the mouse is described
  752.   by the style in the variable "motion::style".  You can use the
  753.   normal style functions to manipulate this variable.  For example,
  754.   you can turn off underlining with the following:
  755.   
  756.     (set-style-underline motion::style nil)
  757.   
  758.   Now, nothing will show up.  To have just the text foreground color
  759.   change on mouse selection, do:
  760.   
  761.     (set-style-foreground motion::style "yellow")
  762.     (set-style-background motion::style (background))
  763.     
  764.   Replace "yellow" with any desired X color name.
  765.   
  766.   To have the selected region appear as reverse video, try:
  767.   
  768.     (set-style-foreground motion::style (background))
  769.     (set-style-background motion::style (foreground))
  770.   
  771.   To have the selected region appear with an overlayed diagonal stipple
  772.   pattern, try:
  773.   
  774.     (set-style-background motion::style "red")
  775.     (set-style-background-stipple motion::style
  776.       (make-bitmap 4 4 "\167\273\335\356"))
  777.   
  778.   The style bound to motion::style has default settings as follows:
  779.   
  780.     (set-style-foreground motion::style (foreground))
  781.     (set-style-background motion::style (background))
  782.     (set-style-underline motion::style (foreground))
  783.   
  784. *                           === MENUS ===
  785.  
  786. E-1: Does Epoch support popup menus or menubars?
  787.   
  788.   The base Epoch distribution does not have native support for popup
  789.   menus or menubars.  However, there are other ways to use menus with
  790.   Epoch.
  791.   
  792.   METHOD #1:
  793.   
  794.   If you're running the window manager GWM (available via anonymous
  795.   FTP to export.lcs.mit.edu (18.24.0.12) in /contrib/gwm), you can use
  796.   the Epoch contrib 'wm-menu' package (found in the contrib tar file
  797.   on cs.uiuc.edu) to have GWM provide menus that pass messages to
  798.   Epoch.
  799.   
  800.   METHOD #2:
  801.   
  802.   If you're running a window manager that has user-specifiable menus
  803.   (as all of the common window managers do), you can perform
  804.   particular commands from a menu.  These commands can communicate
  805.   with epoch, and get it to do things.
  806.   
  807.   One way to do this is to use "xse" (XSendEvent) and send characters
  808.   that happen to be bound to the commands you want to activate.  To
  809.   bind arbitrary commands to menu entries in this manner, you need to
  810.   define a unique keystroke pattern (with global-set-key) for each
  811.   command and then send that keystroke pattern with xsendevent via the
  812.   menu.  See the section on rebind-key (below) for more information on
  813.   this technique.  (Of course, you are also free to have xsendevent
  814.   send a key sequence like 'ESC x u n d o RET' directly to Epoch.)
  815.   
  816.   A better way is to use gnudoit, which communicates to gnuserv.
  817.   Gnuserv, gnuclient, and gnudoit are replacements for emacsclient and
  818.   its server.  With gnudoit, you can pass in an Emacs Lisp form to
  819.   evaluate, rather than the less readable X Event description for a
  820.   key binding.
  821.   
  822.   Some window managers (such as TWM) do not allow the user to specify
  823.   client-specific menus -- you can only add menus to all clients.
  824.   This is not an ideal solution, since all windows (Epoch or not) in
  825.   the session will have the menu attached to them, but it does work
  826.   and is quite convenient for use with Epoch.  Other window managers
  827.   (Mwm in particular) allow you to specify a menu on a
  828.   client-by-client basis.  Thus, you can have different menus on
  829.   terminal windows from on Epoch (Mwm will even let you have different
  830.   menus on different screens and on the minibuffer).
  831.   
  832.   Here's a couple of sample Twm menu descriptions.  Note that these
  833.   would show up on all applications that have title bars.
  834.  
  835.   menu "epoch"
  836.   {
  837.     "Epoch Menu"   f.title
  838.     "Undo"         ! "xse 'Ctrl<Key>x' '<Key>u'"
  839.     "Quit"         ! "xse 'Ctrl<Key>x' 'Ctrl<Key>c'"
  840.   }
  841.   LeftTitleButton "~/epochbitmap.bm" = f.menu "epoch"
  842.   
  843.   Or, using gnudoit (notice the more readable function names):
  844.   
  845.   menu "epoch"
  846.   {
  847.     "Epoch Menu"   f.title
  848.     "Undo"         ! "gnudoit '(undo)'"
  849.     "Quit"         ! "gnudoit '(save-buffers-kill-emacs)'"
  850.   }
  851.   LeftTitleButton "~/epochbitmap.bm" = f.menu "epoch"
  852.   
  853.   
  854.   Here's an equivalent Mwm menu, along with resources that will place
  855.   the menu only on Epoch windows.
  856.   
  857.   This goes in your Mwm config file:
  858.   Menu EpochMenu
  859.   {
  860.       "Epoch" f.title
  861.       "Undo"  ! "gnudoit '(undo)'"
  862.       "Quit"  ! "gnudoit '(save-buffers-kill-emacs)'"
  863.   }
  864.  
  865.   This goes in your X defaults:
  866.   Mwm*epoch*windowMenu: EpochMenu
  867.   
  868.   Note the "*epoch*" -- this is the class name of the screen.  If you
  869.   use the -name or -rn options (as described in A-6), this name will
  870.   change.  See the "class" attribute of screens in the epoch manual
  871.   for more on this.
  872.   
  873.   You can get xsendevent at export.lcs.mit.edu (18.24.0.12) in /contrib
  874.   or at ftp.uu.net (137.39.1.9) in /packages/X/contrib.  Gnuserv,
  875.   gnuclient and gnudoit are available at ee.utah.edu, in
  876.   /emacs/etc/gnuserv (and probably other sites, too, but I can't find
  877.   any with Xarchie -- anyone got a good one?).
  878.   
  879.   [From Philippe Bondono (bondono@vnet.ibm.com)., with Mwm and
  880.   gnuclient additions by Brook]
  881.   
  882.   METHOD #3:
  883.   
  884.   A completely different technique involves using a separate X client
  885.   that posts a menu and has Epoch (or for that matter, GNU Emacs)
  886.   receive commands from it.  One example of this technique is
  887.   /gnu/emacs/buttons.tar.Z from anonymous FTP to aix370.rrz.uni-koeln.de
  888.   (134.95.132.2).
  889.   
  890.   METHOD #4:
  891.   
  892.   Another method uses xmenu or xmenu2, which are available at any
  893.   comp.sources.x archive.  (If you don't know of such an archive, try
  894.   anonymous FTP to ftp.uu.net (137.39.1.9) in /usenet/comp.sources.x.)
  895.   After you have compiled xmenu or xmenu2, define the following function
  896.   in your .emacs file:
  897.   
  898.   (defun interpret-output (process output)
  899.     (command-execute (car (read-from-string output))))
  900.   
  901.   Then you can define other functions that make specific menus, with
  902.   menu entries bound to commands, like the following example shows:
  903.   
  904.   (defun make-menu ()
  905.     (interactive)
  906.     (set-process-filter (start-process "xmenu" nil
  907.         "/usr/local/bin/xmenu" "-heading" "Epoch Menu"
  908.         "Undo=undo")
  909.       'interpret-output))
  910.   
  911.   This example uses /usr/local/bin/xmenu to post a one-entry menu to the
  912.   screen; the menu entry's label is "Undo" and the action it triggers in
  913.   Epoch is 'undo'.  Specify as many "Label=action" pairs as you like as
  914.   part of the start-process command.
  915.   
  916.   [From Philippe Bondono (bondono@vnet.ibm.com).]
  917.   
  918.   If you use XView/Open Windows, Dev Joneja (dj7@cunixf.cc.columbia.edu)
  919.   has written a menu/button client similar to xmenu; it's available via
  920.   anonymous FTP from ftp.ncsa.uiuc.edu (141.142.20.50) as
  921.   /outgoing/marca/epoch/xvmenu.tar.Z.
  922.   
  923.   Bob Weiner (rsw@cs.brown.edu) says the following concerning menus
  924.   within Hyperbole:
  925.   
  926.   ----------------------------------------------------------------------
  927.   If you use Hyperbole, you know what the Smart Key system is, context
  928.   sensitive key bindings for many Emacs modes and subsystems.  There is
  929.   a Smart Menu system that goes along with this but has not been
  930.   released because it needs some additional menus and some integration
  931.   work.  It is window manager and window system independent, works under
  932.   Emacs, with a slightly customized version that can highlight selected
  933.   menu items and display menus in a separate Epoch screen, and is
  934.   written entirely in Elisp, so no patching is needed.  It provides much
  935.   easier subsystem access for novices and experienced users and has been
  936.   in use at a few sites for the last several years.
  937.   
  938.   I'd like to get it in a form for release but won't have the time for
  939.   several months.  If an experienced Elisp programmer wanted to
  940.   integrate it with Hyperbole and make any other changes, I [Bob, not
  941.   Marc] would be willing to send it out and coordinate on and test the
  942.   final changes.
  943.   ----------------------------------------------------------------------
  944.   
  945.   See the list of FTP sites below for more information on Hyperbole.
  946.  
  947. *                          === KEYBOARD ===
  948.  
  949. F-1: How do I make the backspace key work properly?
  950.   
  951.   This is actually a GNU Emacs question, but it's included in this FAQ
  952.   because it's probably more important to more people than all the
  953.   other questions here.  (One of the great mysteries of GNU Emacs is
  954.   why the backspace key _still_ doesn't do its job.)
  955.   
  956.   Here are four ways to fix this:
  957.   
  958.   METHOD #1:
  959.   
  960.   Put this in your .emacs file:
  961.   
  962.     (rebind-key "BackSpace" nil "\C-?")
  963.   
  964.   This is the cleanest Epoch-specific solution.  It rebinds 
  965.   the X representation for the backspace key directly to that
  966.   of the delete key.
  967.   
  968.   [Thanks to Joe Wells (jbw@bigbird.bu.edu).]
  969.   
  970.   METHOD #2:
  971.   
  972.   Put this in your .emacs file:
  973.   
  974.     (global-set-key "\C-^bdc" 'backward-delete-char-untabify)
  975.     (rebind-key "BackSpace" nil "\C-^bdc")
  976.   
  977.   This rebinds the X representation for the backspace key to the
  978.   appropriate command for deleting a character backward.  Like the
  979.   first method, this is Epoch-specific.
  980.   
  981.   If you don't like to have your backspace key also untabify (i.e.,
  982.   convert tags to spaces on the fly), use this instead of the previous
  983.   global-set-key:
  984.   
  985.     (global-set-key "\C-^bdc" 'backward-delete-char)
  986.   
  987.   METHOD #3:
  988.   
  989.   Put this in your .emacs file:
  990.   
  991.     (global-set-key "\C-h" 'backward-delete-char-untabify)
  992.     (global-set-key "\C-xh" 'help-command) ; override mark-whole-buffer
  993.     
  994.   This makes C-h (the backspace key as well as the Control-h key
  995.   sequence) delete characters backward, and shifts responsibility for
  996.   help to C-x h.  This fix will work for GNU Emacs as well as Epoch.
  997.   
  998.   If you don't like to have your backspace key also untabify (i.e.,
  999.   convert tabs to spaces on the fly), use this instead of the previous
  1000.   global-set-key for C-h:
  1001.   
  1002.     (global-set-key "\C-h" 'backward-delete-char)
  1003.   
  1004.   METHOD #4:
  1005.   
  1006.   Outside of Epoch, you can change the X representation of the
  1007.   BackSpace key into a Delete by doing this:
  1008.   
  1009.     xmodmap -e "keysym BackSpace = Delete"
  1010.   
  1011.   This approach has the disadvantage of not being done inside
  1012.   of Epoch for those who prefer customizing lisp code to
  1013.   customizing their system environments.
  1014.   
  1015.   [Thanks to Joe Wells (jbw@bigbird.bu.edu).]
  1016.   
  1017. F-2: How do I make the keys marked "Page Up" and "Page Down" on an IBM
  1018.  Selectric-style keyboard do their jobs?
  1019.   
  1020.   Using the key rebinding facility discussed below, you can put the
  1021.   following two lines in your .emacs file:
  1022.   
  1023.     (rebind-key "Prior" nil "\M-v") ; Note Prior, not Page Up.
  1024.     (rebind-key "Next" nil "\C-v")  ; Note Next, not Page Down.
  1025.   
  1026.   Similarly, if you want "Home" and "End" to go to the beginning and end
  1027.   of the current buffer respectively, do:
  1028.   
  1029.     (rebind-key "Home" nil "\M-<")
  1030.     (rebind-key "End" nil "\M->")
  1031.   
  1032. F-3: How do I bind keys in the numeric keypad on an IBM Selectric-style
  1033.  keyboard to their obvious functions (arrow movement, home, end, etc.)?
  1034.   
  1035.   Put these lines in your .emacs file:
  1036.   
  1037.     (rebind-key "KP_Home" nil "\M-<")
  1038.     (rebind-key "KP_Up" nil "\C-p")
  1039.     (rebind-key "KP_Prior" nil "\M-v")
  1040.     (rebind-key "KP_Left" nil "\C-b")
  1041.     (rebind-key "KP_Begin" nil "\C-l")
  1042.     (rebind-key "KP_Right" nil "\C-f")
  1043.     (rebind-key "KP_End" nil "\M->")
  1044.     (rebind-key "KP_Down" nil "\C-n")
  1045.     (rebind-key "KP_Next" nil "\C-v")
  1046.     
  1047.   NOTE: This makes the keypad arrow keys work, the keypad PgUp/PgDown
  1048.   work, and the keypad Home/End go to the beginning/end of the
  1049.   buffer.
  1050.   
  1051.   Other keys appropriate for rebinding in a Selectric-style numeric
  1052.   keypad include KP_Divide, KP_Multiply, KP_Subtract, KP_Add, KP_Enter,
  1053.   KP_Insert, and KP_Delete; see below for more details.
  1054.   
  1055. F-4: What general facilities does Epoch provide for rebinding function
  1056.  keys, and how do I use them?
  1057.   
  1058.   The rebind-key function allows you to rebind any keycode to a new
  1059.   string.  An example is probably best to show how this works.  To make
  1060.   the key marked "Page Up" (on IBM Selectric-style keyboards) actually
  1061.   move the current buffer up a page (like M-v), do:
  1062.   
  1063.     (rebind-key "Prior" nil "\M-v")
  1064.   
  1065.   Note that "Prior" is the actual X keysym name for the "Page Up" key;
  1066.   to see the X keysym names, refer to /usr/include/X11/keysymdef.h (or
  1067.   $OPENWINHOME/include/X11/keysymdef.h on OpenWindows systems).
  1068.   (Disregard the leading XK_ in keysymdef.h's definitions for Epoch's
  1069.   purposes; thus, X11's "XK_Prior" becomes Epoch's "Prior".  To find out
  1070.   which keys are actually active for your keyboard and server, use the
  1071.   command "xmodmap -pk".)
  1072.   
  1073.   The standard function keys are named F1 through F12, the function keys
  1074.   on the left side of a Sun-style keyboard are named L1 through L10, and
  1075.   so on.  The keypad apparently cannot be addressed by KP_0 through KP_9
  1076.   but must be referenced by names like KP_Left, KP_Up, and so on.
  1077.   
  1078.   A simple two-step approach for binding function keys to commands
  1079.   involves binding a key to an arbitrary GNU Emacs key encoding (in the
  1080.   following example, C-^ k 1) and then binding that encoding to the
  1081.   command.  An example that binds the function key marked "End" to an
  1082.   arbitrary command (in this case, end-of-line) follows:
  1083.   
  1084.     (rebind-key "End" 0 "\C-^k1")
  1085.     (global-set-key "\C-^k1" 'end-of-line)
  1086.     
  1087.   Note that the above is only an example of the two-step method; if you
  1088.   really want "End" to do 'end-of-line, do the obvious instead:
  1089.   
  1090.     (rebind-key "End" 0 "\C-e")
  1091.   
  1092.   The rebind-key command allows modifiers (e.g. shift, control) to be
  1093.   specified; the following example binds Control-"End" to an arbitrary
  1094.   command (in this case, end-of-buffer):
  1095.   
  1096.     (rebind-key "End" 'control "\C-^Ck1")
  1097.     (global-set-key "\C-^Ck1" 'end-of-buffer)
  1098.   
  1099.   For an example of these principles in action, see the file
  1100.   'amc/keys.el' in the 3.2 contrib directory (which is still up for
  1101.   anonymous ftp at cs.uiuc.edu as a separate .tar.Z file) or at
  1102.   ftp.ncsa.uiuc.edu in /outgoing/marca/epoch.
  1103.   
  1104.   [Thanks to Alan Carroll (carroll@cs.uiuc.edu).]
  1105.   
  1106. F-5: I want Epoch to disregard accidental presses of function keys that
  1107.  insert spurious characters (e.g., "-1~") into the buffer.  Does Epoch
  1108.  perchance have some magical way to make this happen?
  1109.   
  1110.   Perchance, Epoch does.  The variable epoch::function-key-mapping, if
  1111.   set to nil, makes Epoch disregard such keys, unless they're explicitly
  1112.   rebound with rebind-key.  You can set this in your .emacs file like
  1113.   so:
  1114.   
  1115.     (setq epoch::function-key-mapping nil)
  1116.   
  1117.   [Thanks to Alan Carroll (carroll@cs.uiuc.edu).]
  1118.   
  1119. F-6: How do I turn the keyboard bell off?
  1120.   
  1121.   The easy answer is to put the following line in your .emacs file:
  1122.   
  1123.     (setq epoch::bell-volume -50)
  1124.   
  1125.   Another possibility, if you like visual bells (i.e., having the
  1126.   entire edit window flash reverse video instead of hearing an audible
  1127.   beep), is to put the following in your .emacs file:
  1128.   
  1129.     (epoch::set-bell t)
  1130.   
  1131.   The malicious answer, for those who, like myself, never want to hear
  1132.   another beep for the rest of time, is to modify src/x11term.c in the
  1133.   Epoch distribution; just change the line that reads:
  1134.   
  1135.     XBell (xs->display,volume);
  1136.   
  1137.   To:
  1138.   
  1139.     /* XBell (xs->display,volume); */
  1140.   
  1141.   Then recompile.
  1142.  
  1143. *                        === HIGHLIGHTING ===
  1144.  
  1145. G-1: How do I highlight regions of text in a buffer with different styles?
  1146.   
  1147.   While the current Epoch distribution contain plenty of support for
  1148.   zones and styles, the enabling mechanisms that make syntax-directed
  1149.   highlighting possible, no intrinsic support for such highlighting is
  1150.   provided.  This situation may change in subsequent releases of Epoch.
  1151.   
  1152.   Three packages that provide varying degrees of support for
  1153.   syntax-directed highlighting are:
  1154.   
  1155.   tek-highlight-2.0.tar.Z (available from archive.cis.ohio-state.edu
  1156.   or ftp.ncsa.uiuc.edu, see below), which supports comment highlighting
  1157.   in source code as well as support for the Info documentation browser,
  1158.   various mail and news packages, and manual pages.
  1159.   
  1160.   lightbrite.tar.Z (available from ftp.ncsa.uiuc.edu, see below),
  1161.   written by Marc Andreessen to allow per-mode regexp-based
  1162.   highlighting.  Thus, you can have all #define's/#endif's in red,
  1163.   setq's and defun's in green, int/float/double's in yellow, '-->'s in
  1164.   purple, and so on.  Here's something from its README:
  1165.    o Accurate comment highlighting.
  1166.    o Regexp touchup highlighting.
  1167.    o Easy specification of visual attributes of multiple 
  1168.       highlighting styles.
  1169.    o Instant highlighting (as you type) with adjustable 
  1170.       responsiveness.
  1171.    o Buffer size thresholds for both comment and touchup 
  1172.       highlighting.
  1173.    o Use of minor mode and local keymaps.
  1174.    o Re-highlight visible screen, current paragraph, current
  1175.       function, immediate area, or entire buffer.
  1176.    o Large assortment of default mode-specific highlighting
  1177.       patterns.
  1178.    o Automatic highlight on find-file and/or write-file.
  1179.    o Special handling of mail and rmail modes.
  1180.    o Works with both Epoch and Lucid Emacs transparently.
  1181.  
  1182.   hilit.el.Z (most recent version was posted to gnu.emacs.souces and is
  1183.   available from ftp.ncsa.uiuc.edu, see below), which provides
  1184.   source-code comment and regexp highlighting.
  1185.   
  1186. *               === EPOCH-SPECIFIC ELISP PACKAGES ===
  1187.  
  1188. H-1: Where can I find Epoch-specific elisp packages?
  1189.   
  1190.   Try the following anonymous FTP sites for Epoch-specific elisp
  1191.   packages:
  1192.  
  1193.   aix370.rrz.uni-koeln.de (134.95.132.2)
  1194.     /gnu/emacs
  1195.   
  1196.   archive.cis.ohio-state.edu (128.146.8.52)
  1197.     /pub/gnu/emacs/elisp-archive/elisp
  1198.     [This is main elisp-archive site; it is mirrored at
  1199.      ftp.uu.net (137.39.1.9) in /languages/emacs-lisp, among other places.
  1200.      Not much Epoch code exists here; in particular, a much more 
  1201.      recent version of hilit.el.Z is at ftp.ncsa.uiuc.edu, below.]
  1202.   
  1203.   ftp.cs.buffalo.edu (128.205.32.3)
  1204.     /pub
  1205.     [This is the distribution site for the new Dired, which will
  1206.      be included in Emacs v19; it includes support for Epoch.]
  1207.   
  1208.   ftp.ncsa.uiuc.edu (141.142.20.50)
  1209.     /outgoing/marca/epoch
  1210.     [This is the previous FAQ maintainer's archive of Epoch code; the
  1211.      README file gives an overview of what he considers to be
  1212.      'essential' Epoch packages, and all of those packages
  1213.      are available there.  If he gets out of date on any of
  1214.      these and you notice it, please let him know.]
  1215.   
  1216.   icsi-ftp.berkeley.edu (128.32.201.55)
  1217.     /pub/elisp
  1218.   
  1219.   ireq-robot.hydro.qc.ca (131.195.2.130)
  1220.     /pub/emacs/lisp
  1221.     [This is the distribution site for the IMOUSE package.]
  1222.   
  1223.   wilma.cs.brown.edu (128.148.31.66)
  1224.     /pub/hyperbole
  1225.     [This is the distribution site for the Hyperbole hypertext
  1226.      system, which includes support for Epoch.  Also available
  1227.      separately from here is the wrolo 'rolodex' package, one of the
  1228.      components of Hyperbole.]
  1229.   
  1230.   Also see the contrib tar file found at cs.uiuc.edu, in the same
  1231.   directory as the actual Epoch distribution.
  1232.   
  1233.   Also watch the gnu.emacs.sources Usenet newsgroup, as well as the
  1234.   epoch newsgroup/mailing list (see below).
  1235.   
  1236.   Please volunteer the names of any sites not on this list.
  1237.   
  1238. H-2: Where can I get a PostScript version of the Epoch manual?
  1239.   
  1240.   Use anonymous ftp to cs.uiuc.edu (128.174.252.1) in 
  1241.   /pub/epoch-files/epoch; get epoch-4.0.epoch-man.ps.Z.
  1242.   
  1243. *                      === OTHER RESOURCES ===
  1244.  
  1245. I-1: What Epoch newsgroups/mailing lists are out there?
  1246.   
  1247.   The Usenet newsgroup gnu.epoch.misc and the mailing list
  1248.   epoch@cs.uiuc.edu are one and the same.  To join the mailing list,
  1249.   send a request to epoch-request@cs.uiuc.edu.  (It is best to read the
  1250.   newsgroup if you have access to it, to save on network resources and
  1251.   the mailing list maintainer's time.)
  1252.   
  1253.   For more general information about Epoch and GNU Emacs, see the list
  1254.   of resources at the start of this file.
  1255.  
  1256. I-2: Where do I send bug reports?
  1257.   
  1258.   Either post to the newsgroup gnu.epoch.misc, or (equivalently) send
  1259.   mail to epoch@cs.uiuc.edu (which is the newsgroup). 
  1260.   
  1261. *                     === ADVANCED QUESTIONS ===
  1262.   
  1263.   [NOTE: This section is at the bottom since the questions involve
  1264.   actual source-code hacking or problems with specific machine
  1265.   configurations that the FAQ moderator cannot personally verify and
  1266.   whose solutions will probably involve some sort of hacking.  If
  1267.   these answers helped you, please let me know.  If I don't hear of
  1268.   people finding these useful, I'm going to remove them.]
  1269.  
  1270. Z-1: Epoch 4.0b1 (or later) (as well as GNU Emacs 18.58) built under
  1271.  HP-UX 8.0 and 8.05 apparently don't recognize the Meta key as Alt.
  1272.  How can this be fixed?
  1273.   
  1274.   Bob Fisher (bob@fisher.depaul.edu) suggests the following command,
  1275.   executed once per session, prior to starting Epoch:
  1276.   
  1277.           xmodmap -e "clear mod1"        \
  1278.                   -e "add mod1 = Meta_R" \
  1279.                   -e "add mod1 = Meta_L"
  1280.   
  1281. Z-2: Why do all of Epoch's colors go away when Epoch is run on an X11R5
  1282.  server with multiple screens?
  1283.   
  1284.   Dana Chee (dana@thumper.bellcore.com) reports that X11R5 has a new
  1285.   SCREEN_RESOURCES property that allows/forces colors to only appear for
  1286.   color screens, but Epoch doesn't look at this property.  This bug
  1287.   will only bite you if you're running on a multi-screen system.  If it
  1288.   happens, there is a workaround; see the xrdb manpage and the xrdb
  1289.   option '-all'.
  1290.   
  1291. Z-3: Even though Epoch 4.0b1 includes fixes to keep the cursor from
  1292.  disappearing (as it does on occasion, especially in a shell, in
  1293.  Epoch 4.0b0), the cursor still disappears sometimes.  Is there a fix
  1294.  for this?
  1295.   
  1296.   First, Epoch 4.0p0 has additional fixes for this problem which
  1297.   presumably will supersede the fix given below.
  1298.   
  1299.   According to Michael Thome (mthome@bbn.com), activating the XFlush
  1300.   code at the end of the CursorToggle routine in 4.0b1's x11term.c seems
  1301.   to fix the problem.  (In other words, '#if 0' on line 737 of x11term.c
  1302.   should be changed to '#if 1'.)
  1303.   
  1304. Z-4: I want Epoch to iconify itself immediately upon starting.  To this
  1305.  end, in my .emacs file I have (epoch::iconify-screen).  But most
  1306.  (~95%) of the time this doesn't work.  How can I make it work all the
  1307.  time?
  1308.   
  1309.   The technical explanation appears to be that the initial Epoch
  1310.   minibuffer and edit screen are unmapped after creation to set some
  1311.   properties for ICCCM purposes and then remapped, and this interferes
  1312.   with the iconification process.
  1313.   
  1314.   One workaround (that may or may not work for you) is to add a sit-for
  1315.   command to your .emacs file right before epoch::iconify-screen; for
  1316.   example:
  1317.   
  1318.     (sit-for 15)
  1319.     (epoch::iconify-screen)
  1320.     
  1321.   [Thanks to Bobby Bodenheimer (bobby@hot.caltech.edu), Simon Kaplan
  1322.   (kaplan@cs.uiuc.edu), and Chris Love (love@cs.uiuc.edu).]
  1323.   
  1324. *                        === CONTRIBUTORS ===
  1325.  
  1326. --> Thanks to the following people for contributing to this FAQ
  1327.     (whether knowingly or not :-) as well as anyone else I may have
  1328.     inadvertently forgotten to list:
  1329.   
  1330.   Bobby Bodenheimer (bobby@hot.caltech.edu)
  1331.   Philippe Bondono (bondono@vnet.ibm.com)
  1332.   Martin Boyer (mboyer@ireq-robot.hydro.qc.ca)
  1333.   Alan Carroll (carroll@cs.uiuc.edu)
  1334.   Nhi Casey (nhi@ariel.aero.org)
  1335.   Dana Chee (dana@thumper.bellcore.com)
  1336.   Alice Chen (alice@innerdoor.austin.ibm.com)
  1337.   Bob Fisher (bob@fisher.depaul.edu)
  1338.   Jerry Graves (jerry@math.ep.utexas.edu)
  1339.   Dev Joneja (dj7@cunixf.cc.columbia.edu)
  1340.   Simon Kaplan (kaplan@cs.uiuc.edu)
  1341.   Tor Lillqvist (tml@tik.vtt.fi)
  1342.   Chris Love (love@cs.uiuc.edu)
  1343.   Simon Marshall (S.Marshall@sequent.cc.hull.ac.uk)
  1344.   Rob McCool (robm@ncsa.uiuc.edu)
  1345.   Michael Thome (mthome@bbn.com)
  1346.   Bob Weiner (rsw@cs.brown.edu)
  1347.   Joe Wells (jbw@bigbird.bu.edu)  
  1348.   
  1349.     Thanks particularly to Jerry Graves for much FAQ work.
  1350.     
  1351.     Thanks also to all the people who have spent time and effort
  1352.     developing Epoch and associated packages.
  1353.  
  1354.     And thanks most especially to Marc Andreessen marca@ncsa.uiuc.edu,
  1355.   the previous maintainer of this FAQ, who has gone on to greater
  1356.   glory, working directly with the epoch team.
  1357.  
  1358. ----------------------------------------------------------------------
  1359.  
  1360.  
  1361. Brook Conner        | Klacktoveedsedstene
  1362. Brown Computer Graphics    | Fortune sez: Brook's Law -- Adding manpower to a late
  1363. dbc@cs.brown.edu         |      software project makes it later
  1364. uunet!brunix!dbc dbc@browncs.bitnet   Box 1910 Brown U Prov RI 02912
  1365.